<template>
  <div class="detail-more" v-if="Object.keys(detailMoreInfo).length !== 0">
    <div class="more-desc">
      <span class="top-left border-span"></span>
      <p>{{ detailMoreInfo.desc }}</p>
      <span class="bot-right border-span"></span>
    </div>

    <div class="more-key">
      <h3>{{ detailMoreInfo.detailImage[0].key }}</h3>
    </div>

    <div class="more-img">
      <div
        :key="index"
        v-for="(item, index) in detailMoreInfo.detailImage[0].list"
      >
        <img :src="item" alt="" @load="moreImgLoad"/>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailMoreInfo",
  props: {
    detailMoreInfo: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  methods: {
    moreImgLoad(){
      this.$emit('moreImgLoad');
    }
  },
};
</script>

<style scoped>
.more-desc {
  position: relative;
  font-size: 15px;
  font-weight: 400;
  margin: 20px 10px;
  padding: 10px 10px;
  text-align: center;
}
.border-span {
  display: block;
  position: absolute;
  width: 60px;
  height: 20px;
}
.top-left {
  top: 1px;
  left: 1px;
  border-top: 3px solid #eee;
  border-left: 3px solid #eee;
}
.bot-right {
  bottom: 1px;
  right: 1px;
  border-bottom: 3px solid #eee;
  border-right: 3px solid #eee;
}
.more-key {
  margin: 5px 10px;
  font-size: 16px;
}
.more-img img {
  width: 100%;
}
</style>
